package com.lzx.adx.report.enums;

public enum YiduiCovertAqyEventTypeEnums {

    register("0","y002","注册"),
    firstPurchase("17","y003","24饿了吗注册24小时内首购，首笔订单"),
    firstPurchase2("17","y003","4饿了吗注册后，在当日内首购，首笔订单"),
    ;


    /**
     * elm
     */
    private String elmCode;

    /**
     * 广点通code
     */
    private String code;

    private String msg;

    public String getElmCode() {
        return elmCode;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    /**
     * 根据饿了么code ,找到广点通code
     * @param elmCode
     * @return
     */
    public static String getQqyCode(String elmCode){
        for (YiduiCovertAqyEventTypeEnums value : YiduiCovertAqyEventTypeEnums.values()) {
            if(value.getElmCode().equals(elmCode)){
                return value.getCode();
            }
        }
        return  null;
    }


    YiduiCovertAqyEventTypeEnums(String code, String elmCode, String msg) {
        this.elmCode = elmCode;
        this.code = code;
        this.msg = msg;
    }
}
